Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

f(x, y) → g1(x, x, y)
f(x, y) → g1(y, x, x)
f(x, y) → g2(x, y, y)
f(x, y) → g2(y, y, x)
g1(x, x, y) → h(x, y)
g1(y, x, x) → h(x, y)
g2(x, y, y) → h(x, y)
g2(y, y, x) → h(x, y)
h(x, x) → x

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

f(x, y) → g1(x, x, y)
f(x, y) → g1(y, x, x)
f(x, y) → g2(x, y, y)
f(x, y) → g2(y, y, x)
g1(x, x, y) → h(x, y)
g1(y, x, x) → h(x, y)
g2(x, y, y) → h(x, y)
g2(y, y, x) → h(x, y)
h(x, x) → x

Q is empty.

We use [23] with the following order to prove termination.

Recursive path order with status [2].
Quasi-Precedence:
f2 > g13 > h2
f2 > g23 > h2

Status:
trivial